package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

   /**
    * 根据菜品id查询套餐id
    * @param dishIds
    * @return
    */
//   @Select("SELECT setmeal_id FROM dish_setmeal WHERE dish_id IN (#{dishIds})")
   List<Long> getSetmealDishIds(List<Long> dishIds);

    /**
     * 批量保存套餐和菜品的关联关系
     * @param setmealDishes
     */
    void insertBatch(List<SetmealDish> setmealDishes);

    @Select("SELECT * FROM setmeal_dish WHERE dish_id = #{dishId}")
    List<SetmealDish> getByDishId();
}
